import React from 'react'
import './index.less'
import { Button, Card, Message, message } from "antd";
import '../ui.less'
export default class Messages extends React.Component {
    handleeShowMessage=(type)=>{
        message[type](
           "恭喜你，React课程晋级成功！"
        )
    }
    render() {
        return (
            <div className="home-wrap">
                <Card title="全局提示框" className="card-warp">
                <Button type="primary" onClick={()=>this.handleeShowMessage('success')}>Success</Button>
                <Button type="primary" onClick={()=>this.handleeShowMessage('info')}>Info</Button>
                <Button type="primary" onClick={()=>this.handleeShowMessage('warning')}>Warning</Button>
                <Button type="primary" onClick={()=>this.handleeShowMessage('error')}>Error</Button>
                <Button type="primary" onClick={()=>this.handleeShowMessage('loading')}>Loading</Button>
                </Card>
            </div>
        )
    }
}